package com.zm.services.impl;

import com.zm.dao.IAccountDao;
import com.zm.domain.Account;
import com.zm.services.IAccountServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("accountServices")
public class AccountServices implements IAccountServices {
    //注入mybatis代理接口类
    @Autowired
    IAccountDao accountDao;
    public List<Account> findAllAccount() {
        System.out.println("业务层：查询所有的方法");
        List<Account> allAccount = accountDao.findAllAccount();
        return allAccount;
    }

    public void saveAccount(Account account) {
        accountDao.saveAccount(account);
    }
}
